// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	1/5/2015 10:53:28 PM				
// -----------------------------

#ifndef _SoundSampler_h
#define _SoundSampler_h

#include "Common.h"
#include "SoundSample.h"

class SoundPlugin;
class SoundFilter;
class SoundPass;

class SoundSampler
{
public:
	SoundSampler(UInt32 sampleRate);
	~SoundSampler();

	SoundSample		Generate(Float frequency, Float amplitude, UInt8 harmonics, Float duration) const;
	void			ResetFilters();

	void	SetPlugin(SoundPlugin* lpPlugin);
	void	AddFilter(SoundFilter* lpFilter);
	void	AddPass(SoundPass* lpPass);

private:

	UInt32					m_SampleRate;
	SoundPlugin*			m_lpPlugin;
	vector<SoundFilter*>	m_Filters;
	vector<SoundPass*>		m_Passes;

	SoundSampler(const SoundSampler& refSoundSampler);
	SoundSampler& operator=(const SoundSampler& refSoundSampler);
};

#endif